<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>重置密码 - LazyCraft 平台</title>
    
    <style>
        /* 邮件客户端兼容性重置 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
            line-height: 1.6;
            color: #1f2937;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            margin: 0;
            padding: 0;
            min-height: 100vh;
        }
        
        .email-wrapper {
            width: 100%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 40px 20px;
            min-height: 100vh;
        }
        
        .email-container {
            max-width: 600px;
            margin: 0 auto;
            background: #ffffff;
            border-radius: 16px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
            overflow: hidden;
        }
        
        .header {
            background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
            padding: 40px 30px;
            text-align: center;
            color: white;
        }
        
        .logo {
            font-size: 28px;
            font-weight: 700;
            margin-bottom: 10px;
            letter-spacing: -0.5px;
        }
        
        .subtitle {
            font-size: 16px;
            opacity: 0.9;
            font-weight: 300;
        }
        
        .content {
            padding: 40px 30px;
        }
        
        .greeting {
            font-size: 20px;
            font-weight: 600;
            color: #1f2937;
            margin-bottom: 20px;
        }
        
        .message {
            font-size: 16px;
            color: #4b5563;
            line-height: 1.7;
            margin-bottom: 30px;
        }
        
        .security-notice {
            background: #fef3c7;
            border-left: 4px solid #f59e0b;
            padding: 20px;
            margin: 30px 0;
            border-radius: 8px;
        }
        
        .security-notice .icon {
            font-size: 20px;
            margin-right: 10px;
            vertical-align: middle;
        }
        
        .security-notice .text {
            color: #92400e;
            font-size: 14px;
            font-weight: 500;
        }
        
        .button-container {
            text-align: center;
            margin: 40px 0;
        }
        
        .reset-button {
            display: inline-block;
            background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
            color: #ffffff !important;
            text-decoration: none;
            padding: 16px 40px;
            border-radius: 50px;
            font-weight: 600;
            font-size: 16px;
            text-align: center;
            transition: all 0.3s ease;
            box-shadow: 0 10px 30px rgba(79, 70, 229, 0.3);
            letter-spacing: 0.5px;
        }
        
        .reset-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 15px 40px rgba(79, 70, 229, 0.4);
        }
        
        .alternative-link {
            margin-top: 25px;
            padding: 20px;
            background: #f8fafc;
            border-radius: 8px;
            border: 1px dashed #d1d5db;
        }
        
        .alternative-link .label {
            font-size: 14px;
            color: #6b7280;
            margin-bottom: 10px;
            font-weight: 500;
        }
        
        .alternative-link .url {
            font-size: 13px;
            color: #4f46e5;
            word-break: break-all;
            font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
            background: white;
            padding: 10px;
            border-radius: 4px;
            border: 1px solid #e5e7eb;
        }
        
        .info-section {
            margin: 30px 0;
            padding: 25px;
            background: #f0f9ff;
            border-radius: 12px;
            border: 1px solid #e0f2fe;
        }
        
        .info-title {
            font-size: 16px;
            font-weight: 600;
            color: #0369a1;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
        }
        
        .info-title .icon {
            margin-right: 8px;
            font-size: 18px;
        }
        
        .info-list {
            list-style: none;
            padding: 0;
        }
        
        .info-list li {
            padding: 8px 0;
            color: #075985;
            font-size: 14px;
            position: relative;
            padding-left: 20px;
        }
        
        .info-list li::before {
            content: "✓";
            position: absolute;
            left: 0;
            color: #059669;
            font-weight: bold;
        }
        
        .warning-section {
            margin: 30px 0;
            padding: 25px;
            background: #fef2f2;
            border-radius: 12px;
            border: 1px solid #fecaca;
        }
        
        .warning-title {
            font-size: 16px;
            font-weight: 600;
            color: #dc2626;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
        }
        
        .warning-title .icon {
            margin-right: 8px;
            font-size: 18px;
        }
        
        .warning-text {
            color: #991b1b;
            font-size: 14px;
            line-height: 1.6;
        }
        
        .footer {
            background: #f8fafc;
            padding: 30px;
            border-top: 1px solid #e5e7eb;
            text-align: center;
        }
        
        .footer-content {
            color: #6b7280;
            font-size: 14px;
            line-height: 1.6;
        }
        
        .footer-links {
            margin-top: 20px;
            padding-top: 20px;
            border-top: 1px solid #e5e7eb;
        }
        
        .footer-links a {
            color: #4f46e5;
            text-decoration: none;
            margin: 0 15px;
            font-weight: 500;
        }
        
        .footer-links a:hover {
            text-decoration: underline;
        }
        
        .timestamp {
            margin-top: 20px;
            font-size: 12px;
            color: #9ca3af;
            font-style: italic;
        }
        
        /* 响应式设计 */
        @media only screen and (max-width: 600px) {
            .email-wrapper {
                padding: 20px 10px;
            }
            
            .header {
                padding: 30px 20px;
            }
            
            .content {
                padding: 30px 20px;
            }
            
            .footer {
                padding: 25px 20px;
            }
            
            .reset-button {
                padding: 14px 30px;
                font-size: 15px;
            }
            
            .logo {
                font-size: 24px;
            }
            
            .greeting {
                font-size: 18px;
            }
        }
        
        /* 深色模式支持 */
        @media (prefers-color-scheme: dark) {
            .email-container {
                background: #1f2937;
                color: #f9fafb;
            }
            
            .greeting {
                color: #f9fafb;
            }
            
            .message {
                color: #d1d5db;
            }
            
            .footer {
                background: #111827;
                border-top-color: #374151;
            }
            
            .footer-content {
                color: #9ca3af;
            }
        }
    </style>
</head>

<body>
    <div class="email-wrapper">
        <div class="email-container">
            <!-- 头部区域 -->
            <div class="header">
                <div class="logo">🚀 LazyCraft</div>
                <div class="subtitle">Agentic AI 应用编排平台</div>
            </div>
            
            <!-- 主要内容 -->
            <div class="content">
                <div class="greeting">
                    您好，{{ to }}！
                </div>
                
                <div class="message">
                    我们收到了您的密码重置请求。为了保护您的账户安全，请点击下方按钮来重置您的密码。
                </div>
                
                <!-- 安全提醒 -->
                <div class="security-notice">
                    <span class="icon">🔒</span>
                    <span class="text">此链接出于安全考虑，将在 24 小时后失效。请尽快完成密码重置。</span>
                </div>
                
                <!-- 重置按钮 -->
                <div class="button-container">
                    <a href="{{ url }}" class="reset-button" style="color: #ffffff;">
                        立即重置密码
                    </a>
                </div>
                
                <!-- 备用链接 -->
                <div class="alternative-link">
                    <div class="label">如果按钮无法点击，请复制以下链接到浏览器中打开：</div>
                    <div class="url">{{ url }}</div>
                </div>
                
                <!-- 安全信息 -->
                <div class="info-section">
                    <div class="info-title">
                        <span class="icon">🛡️</span>
                        安全提醒
                    </div>
                    <ul class="info-list">
                        <li>此邮件由系统自动发送，请勿直接回复</li>
                        <li>重置链接仅限本次使用，使用后将立即失效</li>
                        <li>如果您没有请求重置密码，请忽略此邮件</li>
                        <li>建议设置包含字母、数字和特殊字符的强密码</li>
                    </ul>
                </div>
                
                <!-- 警告信息 -->
                <div class="warning-section">
                    <div class="warning-title">
                        <span class="icon">⚠️</span>
                        重要提醒
                    </div>
                    <div class="warning-text">
                        如果您没有请求重置密码，这可能意味着有人试图访问您的账户。请立即检查您的账户安全设置，并考虑更改密码。如有疑问，请联系我们的技术支持团队。
                    </div>
                </div>
            </div>
            
            <!-- 页脚 -->
            <div class="footer">
                <div class="footer-content">
                    <strong>LazyCraft 平台</strong><br>
                    专业的Agentic AI 应用编排平台<br>
                    致力于为开发者提供最优质的 AI 服务体验
                </div>
                <div class="timestamp">
                    邮件发送时间: {{ create_date or "系统自动发送" }}
                </div>
            </div>
        </div>
    </div>
</body>
</html>